#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
	if (argc == 2)
	{
		if (strcmp(argv[0], "myproc") == 0)
		{
			FILE* pf = fopen(argv[1], "w");
			if (pf == NULL)
			{
				perror("fopen fail\n");
				return 1;
			}
			fclose(pf);
		}
        else  
        {
            printf("commend error,you should use ./myproc [name]\n");
        }
	}
	else
	{
		printf("commend error,you should use ./myproc [name]\n");
	}
	return 0;
}

//int main(int argc, char* argv[])
//{
//	int i = 0;
//	for (i = 0; i < argc; i++)
//	{
//		printf("%d:%s\n", i, argv[i]);
//	}
//	return 0;
//}
